import { Injectable } from '@angular/core';
import { SERVERS_NAME } from '../../../config/config';
import { HttpService } from '../../../core/http.service';
import { CommHttpService } from '../../../core/comm.http.service';
import { Observable } from 'rxjs';
import { Response } from '../../../core/domain/response';

@Injectable()
export class FloorManageService extends CommHttpService {

  protected preUrl = `${SERVERS_NAME.SECURITY_SERVER}sys/floor/`;

  constructor(protected http: HttpService) {
    super(http);
  }

  /**
   * 获取房间树
   */
  treeAll(): Observable<Response> {
    return this.http.post({}, this.preUrl + 'treeAll');
  }

  /**
   * 获取房间树
   */
  tree(): Observable<Response> {
    return this.http.post({}, this.preUrl + 'tree');
  }
}
